Skip to content

Conversation

ronjalh
Copy link
Member

@ronjalh ronjalh commented Nov 11, 2026 •

Closes #203.

The peer feedback said Lucide icons cannot be tree-shaken and that Brotli could help. We measured both and changed no code. The VM is not changed.

  • Lucide: the claim does not hold for how we import. The app imports 13 icons, and exactly 13 icon modules (plus 12 helper modules) are in the bundle: 12.1 kB before minification, out of 767 kB.
  • Brotli: not set up, for two reasons: we did not have the time and capacity, and the gain is small. At Apache's default quality it is about 6% smaller than gzip for the JavaScript (225,354 B against 239,781 B).
  • VM today: it sends gzip and no Brotli (checked with curl).
  • If it is done later: use SetOutputFilter BROTLI_COMPRESS;DEFLATE. AddOutputFilterByType BROTLI_COMPRESS alone gave gzip to browsers in a container with the VM's Ubuntu and Apache versions. Not tried on the VM itself.

Changed: docs/SUSTAINABILITY.md (numbers and the decision) and docs/AI_USAGE.md.

🤖 Generated with Claude Code

Ronja added 3 commits November 11, 2026 18:08
…othing

The peer feedback said that Lucide icons cannot be tree-shaken and that
Brotli could help. Both were measured before changing anything:

- 13 icons are imported and 13 icon modules are in the bundle (12.1 kB
  before minification), so the icon imports stay as they are.
- Brotli at the default quality is 6% smaller than gzip, and quality 11
  is 15% smaller but takes about a second per request. The VM sends gzip
  and no Brotli.

SUSTAINABILITY.md has the numbers and the decision, VM_SETUP.md has the
optional steps for Apache (not tried on the VM), and AI_USAGE.md has the
entry.

Refs #203
…untu and Apache

A container test with Ubuntu 26.04.1 and Apache 2.4.66 (the VM's versions)
showed that AddOutputFilterByType BROTLI_COMPRESS, the example in the
mod_brotli documentation, is not enough on Ubuntu: deflate.conf adds the
gzip filter for the same types, and a browser then gets gzip. Brotli is
only sent to a client that asks for nothing but br.

SetOutputFilter BROTLI_COMPRESS;DEFLATE in a LocationMatch for
/project2/assets/ gives Brotli to a browser, gzip to a gzip-only client,
and leaves the WOFF2 fonts alone. The module comes with the apache2
package on Ubuntu, so nothing has to be installed.

Refs #203
@ronjalh ronjalh requested a review from a team as a code owner November 11, 2026 17:23
@ronjalh ronjalh self-assigned this Nov 11, 2026
Brotli is not set up, so the steps do not belong in the VM setup guide.
The decision and the finding about SetOutputFilter stay in
SUSTAINABILITY.md.

Refs #203
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant